package fun.barryhome.ebean.model;

import io.ebean.annotation.ChangeLog;
import io.ebean.annotation.DbComment;
import io.ebean.annotation.Encrypted;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Table;

@ChangeLog
@Builder
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "user")
public class User extends BaseModel {

    @DbComment("the name")
    private String name;

    @Encrypted
    private String phone;

    private Integer loginCount = 0;

    @Encrypted(dbEncryption=false)
    String description;
}
